<?php
	include("global.php");
	$categorys_temp = $db->findall('category');
while ($row = $db->fetch_array($categorys_temp)) {
    $categorys[$row[id]] = $row[typename];
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link href="css/main.css" rel="stylesheet" type="text/css" />
<link href="css/div.css" rel="stylesheet" type="text/css" />
<script src="js/jquery.js" language="javascript" type="text/javascript"></script>
<script src="js/jquery-1.4.2.js" language="javascript" type="text/javascript"></script>
<script src="js/secondmenu.js" language="javascript" type="text/javascript"></script>
<style type="text/css">
.pages { height:25px; overflow:hidden; text-align:center; line-height:25px; font-family:Verdana; }
.pages a, .pages strong { margin:0 1px; padding:2px 6px; border:1px solid #E4E4E4; text-decoration:none!important; }
.pages a:hover { border-color:#369; color:369 }
.backs { border-color:#369; background:#369; color:#FFF; }
.pages .prev { padding:4px 6px 2px 20px!important; padding:4px 6px 0 20px; background:url(images/arrow_left.gif) no-repeat 9% 50%; font-family:simsun; }
.next { padding:4px 20px 2px 6px!important; padding:4px 20px 0 6px; background:url(images/arrow_right.gif) no-repeat 91% 50%; font-family:simsun; }
</style>
<script type="text/javascript">
	$(function(){
		$("#fenye a").click( function() {
			$(this).addClass("backs");
		});
	});	 
</script>


</head>
<?php
	include("conn/conn.php");
if(isset($_POST['submit']))
{	
        $whychoose = $_POST['whychoose'];
        $xuanchuan = $_POST['xuanchuan'];
        $yinsu= $_POST['yinsu'];
        $jiaxuanc = $_POST['jiaxuanc'];
		$cushi = $_POST['cushi'];
		$jijie = $_POST['jijie'];     
		$fuyong = $_POST['fuyong'];   
		$mingxin = $_POST['mingxin'];   
		$guanggao = $_POST['guanggao'];   
		$nali = $_POST['nali'];   
		$yaoqiu = $_POST['yaoqiu'];  

		$sql = mysql_query("insert into `diaocha` values('','$whychoose','$xuanchuan','$yinsu','$jiaxuanc','$cushi','$jijie','$fuyong','$mingxin','$guanggao','$nali','$yaoqiu')");
		if($sql){
			echo "<script>alert('提交成功'); window.location.href = 'index.php';</script>";
		}
}

?>
<body>
<div class="box1">
	<?php
			include("top.php");
		?>
		<embed src="swf/index1-1.swf" width="1002" height="256" quality="high" wmode="transparent"  />
		  </div>
		</div>
		<div style=" height:10px;">&nbsp;</div>
		
	<div style=" height:20px;">&nbsp;</div>
	<div style=" width:1003px;">
		<div style=" width:200px; overflow:hidden; float:left;">
			
			<?php
				include("quick_tree.php");
				include("search.php");
			?>
		</div>
		<div style="float:left; width:50px;">&nbsp;</div>
		<div style=" float:left; width:750px;">
			<div style=" width: 750px; background-color:#8DBAE0; height:5px;"></div>
			<div style=" width:200px; height:15px;">&nbsp;</div>
			<div style=" width:750px; height:20px;">
				<span style=" float:left; text-align:left;color:#768DC1; font-size:15px; font-weight:bolder; height:30px;">
					经理信箱
				</span><span style=" float:right;text-align:right" id="span1"><a href="index.php">首页</a>-><a href="managermail.php">经理信箱</a></span>
			</div>
			<div style=" height:10px;">&nbsp;</div>
			<script language="javascript" type="text/javascript">
				function checks(){
					debugger;
					var titles = document.getElementById("titles");
					var contents = document.getElementById("contents");
					
					if(titles.value=="" || titles.value == undefined){
						alert("标题不能为空");
						return false;
					}
					else if(contents.value=="" || contents.value == undefined){
						alert("内容不能为空");
						return false;
					}
					else{alert("发送成功!"); window.location.reload();}
				}
			</script>
			<div style=" width:750px; text-align:left;">
				<div style=" width:140px; float:left; margin:0px 20px 10px 0px; text-align:right">
					邮 箱:
				</div>
				<div style=" width:200px; float:left; margin:0px 0px 10px 0px; text-align:left">
					<b><?php if(isset($_SESSION["username"])) echo $_SESSION["username"]; else echo "<input type='text' style='border-bottom:1px solid gray' />"?></b>
				</div>
				<div style=" clear:both"></div><br /><br />
				<div style=" width:140px; float:left; margin:0px 20px 10px 0px; text-align:right">
					经理邮箱:
				</div>
			
				<div style=" width:200px; float:left; margin:0px 0px 10px 0px; text-align:left">
					<b>zhu-yijie@hotmail.com</b>
				</div>
				<div style=" clear:both"></div><br /><br />
				<div style=" width:140px; float:left; margin:0px 20px 10px 0px; text-align:right" id="titles">
					标 题:
				</div>
				<div style=" width:200px; float:left; margin:0px 0px 10px 0px; text-align:left">
					<input type="text" style="border-bottom:1px solid gray" />
				</div>
				<div style=" clear:both"></div><br /><br />
				<div style=" width:140px; float:left; margin:0px 20px 10px 0px; text-align:right" id="contents">
					内 容:
				</div>
				<div style=" width:200px; float:left; margin:0px 0px 10px 0px; text-align:left">
					<textarea cols="50" rows="5" style="border:1px solid gray"></textarea>
				</div>
				<div style=" clear:both"></div><br /><br />
				<div style=" width:140px; float:left; margin:0px 20px 10px 0px; text-align:right">
					&nbsp;
				</div>
				<div style=" width:200px; float:left; margin:0px 0px 10px 0px; text-align:left">
					
				  <div align="left">
				    <input type="button" value="发送" style=" border:1px solid gray; width:40px; height:24px; line-height:24px;" onclick=" return checks()" />
			      </div>
				</div><br /><br /><br /><br />
			</div>
		</div>
	</div>
	<?php
		include("foot.php");
	?>
</div>
</body>
</html>

